/*
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.f1x.api.message.fields;

// Generated by org.f1x.tools.DictionaryGenerator from QuickFIX dictionary
public enum MDReqRejReason implements org.f1x.api.message.types.ByteEnum {
	UNKNOWN_SYMBOL((byte)'0'),
	DUPLICATE_MDREQID((byte)'1'),
	INSUFFICIENT_BANDWIDTH((byte)'2'),
	INSUFFICIENT_PERMISSIONS((byte)'3'),
	UNSUPPORTED_SUBSCRIPTIONREQUESTTYPE((byte)'4'),
	UNSUPPORTED_MARKETDEPTH((byte)'5'),
	UNSUPPORTED_MDUPDATETYPE((byte)'6'),
	UNSUPPORTED_AGGREGATEDBOOK((byte)'7'),
	UNSUPPORTED_MDENTRYTYPE((byte)'8'),
	UNSUPPORTED_TRADINGSESSIONID((byte)'9'),
	UNSUPPORTED_SCOPE((byte)'A'),
	UNSUPPORTED_OPENCLOSESETTLEFLAG((byte)'B'),
	UNSUPPORTED_MDIMPLICITDELETE((byte)'C');

	private final byte code;

	MDReqRejReason (byte code) {
		this.code  = code;
	}

	public byte getCode() { return code; }

	public static MDReqRejReason parse(String s) {
		switch(s) {
			case "0" : return UNKNOWN_SYMBOL;
			case "1" : return DUPLICATE_MDREQID;
			case "2" : return INSUFFICIENT_BANDWIDTH;
			case "3" : return INSUFFICIENT_PERMISSIONS;
			case "4" : return UNSUPPORTED_SUBSCRIPTIONREQUESTTYPE;
			case "5" : return UNSUPPORTED_MARKETDEPTH;
			case "6" : return UNSUPPORTED_MDUPDATETYPE;
			case "7" : return UNSUPPORTED_AGGREGATEDBOOK;
			case "8" : return UNSUPPORTED_MDENTRYTYPE;
			case "9" : return UNSUPPORTED_TRADINGSESSIONID;
			case "A" : return UNSUPPORTED_SCOPE;
			case "B" : return UNSUPPORTED_OPENCLOSESETTLEFLAG;
			case "C" : return UNSUPPORTED_MDIMPLICITDELETE;
		}
		return null;
	}

}